Skip to content

Conversation

@a-w50
Copy link
Contributor

@a-w50 a-w50 commented Nov 9, 2024

Describe your changes

See commit messages

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

a-w50 added 2 commits November 9, 2024 11:55
- variant for `authorization_mode` in `AuthorizationReq` has been
  introduced
- sdp packet buffer size has been increased to 4k, in order to be large
  enough to contain sample data from josev
- crucial bug has been fixed in `ServiceDetail` serialization, where the
  `ParameterSet` has not been initialized/zero-initialized properly --
  this will need some follow up discussion
- some PnC related message and state handling has been added/refactored
- minor refactorings on conversion functions

Signed-off-by: aw <[email protected]>
- some comments have been added, which should be handled in near future

Signed-off-by: aw <[email protected]>
Signed-off-by: aw <[email protected]>
@SebaLukas SebaLukas self-assigned this Nov 13, 2024
Copy link
Member

@SebaLukas SebaLukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good as preparation for the PnC implementation 👍

I would suggest that you change the PR title. With the current title one could think that the complete PnC implementation will take place here and then PnC will work. Which is not the case.

uint8_t buffer[2048];
// FIXME (aw): what buffer size to allow here? Could also be made
// dynamic
uint8_t buffer[4096];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should start to use std::array instead of a c buffer.
I am fine with increasing the buffer size to 4096. I think that's more of an experience value. 4096 should be enough for now.


enum class Signal {
REQUIRE_AUTH_EIM,
REQUIRE_AUTH_PNC,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should send also the contract cert chain from the AuthorizationReq message as well. But only once.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not have to be part of this PR, but will be added when PnC is fully implemented.

if (not in.discharge_limits) {
return;
}
auto& discharge_limits = in.discharge_limits.value();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const auto instead of auto


// Todo(sl): PnC is currently not supported
ctx.feedback.signal(session::feedback::Signal::REQUIRE_AUTH_EIM);
ctx.feedback.signal(required_auth_signal(res));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this feedback.signal call to the authorization state. Only in the authorization state is it clear whether the car is requesting PnC or EIM.

@EVerest EVerest deleted a comment from sonarqubecloud bot Mar 25, 2025
@SebaLukas SebaLukas marked this pull request as draft May 12, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants